package com.demo.seata.config;

import io.seata.console.config.WebSecurityConfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

/**
 * @author DayDayUp
 * @datetime 2023-09-13 11:46
 **/
// 后期尝试将配置通过HttpSecurity#authorizeHttpRequests 放行，避免控制台警告
//WARN  o.s.s.config.annotation.web.builders.WebSecurity - You are asking Spring Security to ignore Ant [pattern='/**/*.png'].
//        This is not recommended -- please use permitAll via HttpSecurity#authorizeHttpRequests instead.
//public class SeataSecurityConfig extends WebSecurityConfig {
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
//        String permitUrls = "/,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login";
//        String[] permitUrlArr = permitUrls.split(",");
//        http.authorizeHttpRequests()
//                .antMatchers(permitUrlArr).permitAll();
//    }
//}
